﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;

using efish.Framework.Model;

namespace efish.Framework.Dao
{
    /// <summary>
    /// Summary description for Users
    /// </summary>
    public class RolesDAO : BaseDAO<Role>
    {
        public RolesDAO()
        {
        }

        //public void CreateRole(Role role, List<int> rightIDs)
        //{
        //    foreach (int i in rightIDs)
        //    {
        //        Right right = this.Load<Right>(i);
        //        role.Rights.Add(right);
        //    }
        //    base.Save(role);
        //}

        //public void UpdateRole(int roleid, string name, string dec, List<int> rightIDs)
        //{
        //    Role role = this.Load(roleid);
        //    role.Rights.Clear();

        //    foreach (int i in rightIDs)
        //    {
        //        Right right = this.Load<Right>(i);
        //        role.Rights.Add(right);
        //    }
        //    role.Name = name;
        //    role.Des = dec;
        //    base.Update(role);
        //}
    }
}
